<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="com.zmht.specedu.vo.Teachbook,com.zmht.specedu.vo.Soundstudy,java.util.*,com.zmht.specedu.rescue.web.form.TargetForm,com.zmht.specedu.vo.Soundstudy"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%
    /**
     * @author 谭湘元
     * @since 2009/04/23
     */
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>聋校备课与语言学习及矫治系统</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link
	href="<%=request.getContextPath()%>/<fmt:message key='StylePath' />style.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="<fmt:message key='datePicker' />WdatePicker.js"></script>
<script type="text/javascript">
	function createTeachPlan(){
		var planName = document.forms[0].planName.value;
		var designTime = document.forms[0].planerTime_f.value;
		if(planName==""){
			alert("计划名称必须填写！");
			document.forms[0].planName.focus();
			return;
		}
		if(designTime==""){
			alert("制定时间必须填写！");
			document.forms[0].planerTime_f.focus();
			return;
		}
		if(document.forms[0].classID.value==""){
			alert("班级必须选择！");
			document.forms[0].classID.focus();
			return;
		}
		document.forms[0].method.value="addTeachPlan";
		document.forms[0].submit();
	}
	window.onload = function(){
		var successFlag = "<c:out value="${addTeachPlanSuccess}" />"
		if(successFlag!="")
			alert(successFlag);
	}
</script>
</head>

<body  class="bcolor">
<html:form action="teachPlan.do" method="post">
	<input type="hidden" name="method" value="toAddTeachPlan" />
  <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
	<tbody>
	<tr>
        <td width="7"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_01.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_05.gif"><table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td width="30"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_02.gif" width="30" /></td>
                <td align="left" width="200" background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_03.gif">&nbsp;<strong> 增 加 教 学 计 划</strong></td>
                <td width="59"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_04.gif" width="59" /></td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
        </table></td>
        <td width="8"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_06.gif" width="8" /></td>
    </tr>
    <tr>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_07.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
        <td bgcolor="#f7fbff">
      <table cellspacing="0" bordercolordark="#ccccff" cellpadding="0" width="100%" bordercolorlight="#ffffff" border="0">
	  	<tbody>
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">计划名称：</td>
                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF">
                    <html:text property="planName" style="width:300px;" styleClass="boxcopy2" maxlength="50"></html:text>
                      <span class="STYLE4">*</span></td>
                </tr>
            </table></td>
          </tr>
		  <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">班级类别：</td>
                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF">
                  	<html:radio property="classType" value="0" onclick="javascript:if(this.checked)document.forms[0].submit();"></html:radio>集体班 
                  	<html:radio property="classType" value="1" onclick="javascript:if(this.checked)document.forms[0].submit();"></html:radio>单训组 
				  </td>
                </tr>
            </table></td>
          </tr>
           <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">班级：</td>
                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF">
	                  <select name="classID" style="width:305px;">
						<c:if test="${planForm.classType==0}">
							<c:forEach items="${clazz}" var="vc" varStatus="status">
								<option value="<c:out value="${vc.classId }" />" <c:if test="${status.index==0 }">selected</c:if> >
									<c:out value="${vc.grades.name }" /><c:out value="${vc.classNumber }" />班
								</option>
							</c:forEach>
						</c:if>
						<c:if test="${planForm.classType==1}">
							<c:forEach items="${specialGroups}" var="vc" varStatus="status">
								<option value="<c:out value="${vc.onlyClassId }" />" <c:if test="${status.index==0 }">selected</c:if> >
									<c:out value="${vc.name }" />
								</option>
							</c:forEach>
						</c:if>
					  </select> <span class="STYLE4">*</span>
                  </td>
                </tr>
            </table></td>
          </tr>
          <!-- 
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">制定者：</td>
                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF"><input name="textfield2" type="text" class="boxcopy2" id="textfield"  style="width:100px;"/>
                      <span class="STYLE4">*</span></td>
                </tr>
            </table></td>
          </tr>
           -->
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">制定时间：</td>
                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF">
             					<html:text property="planerTime_f" style="width:300px;" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'whyGreen');" styleClass="boxcopy2"></html:text>  
             					<span class="STYLE4">*</span> </td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="1"></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td height="20" align="center" valign="middle" bgcolor="#e6f0f8"><strong>选择目标</strong></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
                <tr>
                  <td height="20" align="center" valign="middle" bgcolor="#CCDDF2"><strong>选 择</strong></td>
                  <td height="20" align="center" valign="middle" bgcolor="#CCDDF2"><strong>目标名称</strong></td>
                  <td align="center" valign="middle" bgcolor="#CCDDF2"><strong>教材类别</strong></td>

                </tr>
                <c:forEach items="${teachTargets}" var="target">
                <tr>
                  <td height="20" align="center" valign="middle" bgcolor="#FFFFFF">
                  <input type="checkbox" name="targetIds" value="<c:out value="${target.targetId }" />" id="checkbox" />
                  </td>
                  <td height="20" align="center" valign="middle" bgcolor="#FFFFFF">
                  <c:out value="${target.targetName}"></c:out>
                  </td>
                  <td align="center" valign="middle" bgcolor="#FFFFFF">
                  <c:forEach items="${teackBookTypes}" var="bookType">
							<c:if test="${bookType.id==target.bookType}">
								<c:out value="${bookType.name}"></c:out>
							</c:if>
						</c:forEach>	
                  </td>                  
                </tr>
                
                </c:forEach>
            </table></td>
          </tr>
        </tbody>
        </table>
          <table cellspacing="1" cellpadding="0" width="100%" bgcolor="#ffffff" border="0">
           <tbody>
                <tr>
                  <td valign="middle" bgcolor="#e6f0f8"><table cellspacing="0" cellpadding="3" width="100%" border="0">
                      <tbody>
			            <tr>
              <td width="50%" height="20" align="right"><a href="javascript:createTeachPlan();" onfocus="this.blur()"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />gif-01.gif" border="0" /></a>&nbsp;</td>
              <td height="20" align="left">&nbsp;<a href="javascript:document.forms[0].reset();" onfocus="this.blur()"><img src="<%=request.getContextPath()%>/<fmt:message key='CommonImagePath' />gif-02.gif" border="0" /></a></td>
            </tr>
       				 </tbody>
                  </table></td>
                </tr>
           </tbody>
        </table>
		</td>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_09.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
    </tr>
    <tr>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_10.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_11.gif">&nbsp;</td>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_12.gif" width="8" /></td>
      </tr>
	</tbody>
  </table>
</html:form>
</body>
</html>
